import Mock from 'mockjs'

import axios from 'axios'

const path = axios.defaults.baseURL
// const Random = Mock.Random()

// 模拟左侧
Mock.mock(path + '/goods/aside', 'get', {
  asideList: [
    {
      title: '商品管理',
      children: [
        { title: '商品列表', path: '/goods/goodsList' },
        { title: '添加商品', path: '/goods/addGoods' },
        { title: '商品审核', path: '/goods/goodsCheck' },
        { title: '商品回收站', path: '/goods/goodsTrash' },
        { title: '商品评价', path: '/goods/goodsComment' }
      ]
    },
    {
      title: '商品配置',
      children: [
        { title: '商品分类', path: '/goods/goodsSort' },
        { title: '规格参数', path: '/goods/goodsParams' },
        { title: '品牌管理', path: '/goods/brandAdmin' },
        { title: '图片库管理', path: '/goods/imgAdmin' }
      ]
    }
  ],
  status: 200
})
Mock.mock(path + '/runs/aside', 'get', {
  asideList: [
    {
      title: '秒杀专区',
      children: [
        { title: '秒杀活动列表', path: 'runs/miaoSha' },
        { title: '时间段列表', path: 'runs/timeList' }
      ]
    },
    {
      title: '广告管理',
      children: [
        { title: '广告列表', path: 'runs/advetList' },
        { title: '添加广告', path: 'runs/addAdvet' }
      ]
    }
  ],
  status: 200
})
// 模拟商品状态
Mock.mock(path + '/goods/status', 'get', {
  asideList: [
    {
      id: 1,
      title: '全部商品',
      num: 1000
    },
    {
      id: 2,
      title: '已上架',
      num: 1000
    },
    {
      id: 3,
      title: '未上架',
      num: 1000
    },
    {
      id: 4,
      title: '待审核',
      num: 1000
    },
    {
      id: 5,
      title: '未通过',
      num: 1000
    }
  ]
})
// 模拟商品列表的数据
Mock.mock(path + '/goods/goodslist', 'get', {
  goodsList: [
    {
      'bianhao|1-100': 1,
      tupian: "@IMAGE('200x100')",
      name: '@Cword(5, 10)',
      ' price|200-300': 200
    }
  ]
})
